/**
 * Created by Administrator on 2017/4/12.
 */
/**
 * Created by Administrator on 2017/3/30.
 */
app.controller('detailSpecCtr',
    ['$scope','$location','$http','$rootScope','$routeParams','$sce', function ($scope,$location,$http,$rootScope,$routeParams,$sce) {

        // 专题详情1列22表
        var coumStr=$routeParams.columnId;
        var linkIdIndex=coumStr.indexOf('linkId');
        var linkId=coumStr.slice(linkIdIndex+6,coumStr.length);

        $http.jsonp(DetailSpecOneData+'siteId=1&parentColumnId='+linkId+'&version=0&columnType=-1&jsoncallback=JSON_CALLBACK'
        ).success(function(data,header,config,status){
            $scope.specDetaiData=data;
            $scope.specDetaiDataColumns=data.columns;
            var specDetaiDataColumns= $scope.specDetaiDataColumns;
            console.log("标题")
            console.log(data)
            // 详情1具体内容
            $scope.DetailSpecContData=[];

            for(let i=0;i<specDetaiDataColumns.length;i++){

                $scope.DetailSpecContData[i]=[];
                $http.jsonp(specDetailOneConten+'columnId='+specDetaiDataColumns[i].columnId+'&lastFileId=0&count=30&rowNumber=0&version=0&adv=1&jsoncallback=JSON_CALLBACK'
                ).success(function(datas,header,config,status){
                    console.log(datas);
                    $scope.DetailSpecContData[i].push(datas);
                }).error(function(data,header,config,status){
                });

            }
            console.log("组中22")
            console.log($scope.DetailSpecContData)

        }).error(function(data,header,config,status){
        });


    }]);

